/*
 Navicat Premium Data Transfer

 Source Server         : localhost_3306
 Source Server Type    : MySQL
 Source Server Version : 80023
 Source Host           : localhost:3306
 Source Schema         : shop_go

 Target Server Type    : MySQL
 Target Server Version : 80023
 File Encoding         : 65001

 Date: 03/01/2022 22:18:32
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for tz_sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `tz_sys_menu`;
CREATE TABLE `tz_sys_menu` (
  `menu_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '菜单id',
  `parent_id` bigint DEFAULT NULL COMMENT '父菜单ID，一级菜单为0',
  `name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
  `url` varchar(100) DEFAULT NULL COMMENT '菜单URL',
  `perms` varchar(500) DEFAULT NULL COMMENT '授权(多个用逗号分隔，如：user:list,user:create)',
  `type` bigint DEFAULT NULL COMMENT '类型 1:目录   2:菜单   3:按钮',
  `icon` varchar(50) DEFAULT NULL COMMENT '菜单图标',
  `order_num` bigint DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of tz_sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `tz_sys_menu` VALUES (1, 0, '系统管理', '', '', 1, 'ant-design:setting-outlined', 0);
INSERT INTO `tz_sys_menu` VALUES (2, 1, '菜单管理', '/sys/menu', '', 2, '', 4);
INSERT INTO `tz_sys_menu` VALUES (3, 1, '账号管理', '/sys/user', '', 2, '', 1);
INSERT INTO `tz_sys_menu` VALUES (4, 3, '新增', '', 'sys:user:save,sys:role:list', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (5, 3, '编辑', '', 'sys:user:update,sys:role:list', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (6, 3, '删除', '', 'sys:user:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (7, 1, '角色管理', '/sys/role', '', 2, '', 3);
INSERT INTO `tz_sys_menu` VALUES (8, 7, '新增', '', 'sys:role:save,sys:menu:list', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (9, 7, '编辑', '', 'sys:role:update,sys:menu:list', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (10, 7, '删除', '', 'sys:role:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (11, 1, '请求管理', '/sys/xhr', '', 2, '', 5);
INSERT INTO `tz_sys_menu` VALUES (12, 1, '地址管理', '/sys/area', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (13, 12, '新增', '', 'admin:area:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (14, 12, '编辑', '', 'admin:area:update', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (15, 12, '删除', '', 'admin:area:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (16, 0, '门店管理', '', '', 1, 'ant-design:alipay-circle-outlined', 0);
INSERT INTO `tz_sys_menu` VALUES (17, 16, '自提点管理', '/shop/pickAddr', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (18, 16, '公告管理', '/shop/notice', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (19, 0, '产品管理', '', '', 1, 'ant-design:bank-filled', 0);
INSERT INTO `tz_sys_menu` VALUES (20, 19, '分类管理', '/prod/category', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (21, 19, '分组管理', '/prod/prodTag', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (22, 19, '规格管理', '/prod/spec', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (23, 17, '新增', '', 'shop:pickAddr:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (24, 17, '编辑', '', 'shop:pickAddr:update,shop:pickAddr:info', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (25, 17, '删除', '', 'shop:pickAddr:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (26, 11, '新增', '', 'sys:xhr:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (27, 11, '编辑', '', 'sys:xhr:update', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (28, 11, '删除', '', 'sys:xhr:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (29, 20, '新增', '', 'prod:category:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (30, 20, '编辑', '', 'prod:category:info,prod:category:update', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (31, 20, '删除', '', 'prod:category:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (32, 21, '新增', '', 'prod:prodTag:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (33, 21, '编辑', '', 'prod:prodTag:update', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (34, 21, '删除', '', 'prod:prodTag:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (35, 22, '新增', '', 'prod:spec:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (36, 22, '编辑', '', 'prod:spec:update', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (37, 22, '删除', '', 'prod:spec:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (38, 2, '新增', '', 'sys:menu:save,sys:menu:select', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (39, 2, '编辑', '', 'sys:menu:update,sys:menu:select', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (40, 2, '删除', '', 'sys:menu:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (41, 18, '新增', '', 'shop:notice:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (42, 18, '编辑', '', 'shop:notice:update', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (43, 18, '删除', '', 'shop:notice:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (44, 19, '商品管理', 'prod/product', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (45, 19, '商品详情', 'prod/product_detail', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (46, 16, '运费模板', 'shop/transport', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (47, 46, '新增', '', 'shop:transport:save,shop:transfee:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (48, 16, '模板详情', 'shop/transport_detail', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (49, 16, '轮播图管理', '/admin/indexImg', '', 2, '', 0);
INSERT INTO `tz_sys_menu` VALUES (50, 12, '查看', '', 'admin:area:info,admin:area:page,admin:area:list', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (51, 3, '查看', '', 'sys:user:page,sys:user:info', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (52, 7, '查看', '', 'sys:role:page,sys:role:info', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (53, 2, '查看', '', 'sys:menu:list,sys:menu:info', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (54, 17, '查看', '', 'shop:pickAddr:page', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (55, 18, '查看', '', 'shop:notice:info,shop:notice:page', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (56, 49, '查看', '', 'admin:indexImg:page', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (57, 49, '新增', '', 'admin:indexImg:save', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (58, 49, '修改', '', 'admin:indexImg:info,admin:indexImg:update', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (59, 49, '删除', '', 'admin:indexImg:delete', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (60, 20, '查看', '', 'prod:category:list,prod:category:info', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (61, 21, '查看', '', 'prod:prodTag:info,prod:prodTag:page,prod:prodTag:list', 3, '', 0);
INSERT INTO `tz_sys_menu` VALUES (62, 22, '查看', '', 'prod:spec:page,prod:spec:info', 3, '', 0);
COMMIT;

-- ----------------------------
-- Table structure for tz_sys_role
-- ----------------------------
DROP TABLE IF EXISTS `tz_sys_role`;
CREATE TABLE `tz_sys_role` (
  `role_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '角色Id',
  `role_name` varchar(100) DEFAULT NULL COMMENT '角色名称',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建者ID',
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of tz_sys_role
-- ----------------------------
BEGIN;
INSERT INTO `tz_sys_role` VALUES (1, '超级管理员', 'string', 1, '2021-12-31 19:53:04');
COMMIT;

-- ----------------------------
-- Table structure for tz_sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `tz_sys_role_menu`;
CREATE TABLE `tz_sys_role_menu` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
  `role_id` bigint DEFAULT NULL COMMENT '角色ID',
  `menu_id` bigint DEFAULT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of tz_sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `tz_sys_role_menu` VALUES (1, 1, 1);
INSERT INTO `tz_sys_role_menu` VALUES (2, 1, 12);
INSERT INTO `tz_sys_role_menu` VALUES (3, 1, 13);
INSERT INTO `tz_sys_role_menu` VALUES (4, 1, 14);
INSERT INTO `tz_sys_role_menu` VALUES (5, 1, 15);
INSERT INTO `tz_sys_role_menu` VALUES (6, 1, 50);
INSERT INTO `tz_sys_role_menu` VALUES (7, 1, 3);
INSERT INTO `tz_sys_role_menu` VALUES (8, 1, 4);
INSERT INTO `tz_sys_role_menu` VALUES (9, 1, 5);
INSERT INTO `tz_sys_role_menu` VALUES (10, 1, 6);
INSERT INTO `tz_sys_role_menu` VALUES (11, 1, 51);
INSERT INTO `tz_sys_role_menu` VALUES (12, 1, 7);
INSERT INTO `tz_sys_role_menu` VALUES (13, 1, 8);
INSERT INTO `tz_sys_role_menu` VALUES (14, 1, 9);
INSERT INTO `tz_sys_role_menu` VALUES (15, 1, 10);
INSERT INTO `tz_sys_role_menu` VALUES (16, 1, 52);
INSERT INTO `tz_sys_role_menu` VALUES (17, 1, 2);
INSERT INTO `tz_sys_role_menu` VALUES (18, 1, 38);
INSERT INTO `tz_sys_role_menu` VALUES (19, 1, 39);
INSERT INTO `tz_sys_role_menu` VALUES (20, 1, 40);
INSERT INTO `tz_sys_role_menu` VALUES (21, 1, 53);
INSERT INTO `tz_sys_role_menu` VALUES (22, 1, 11);
INSERT INTO `tz_sys_role_menu` VALUES (23, 1, 26);
INSERT INTO `tz_sys_role_menu` VALUES (24, 1, 27);
INSERT INTO `tz_sys_role_menu` VALUES (25, 1, 28);
INSERT INTO `tz_sys_role_menu` VALUES (26, 1, 16);
INSERT INTO `tz_sys_role_menu` VALUES (27, 1, 17);
INSERT INTO `tz_sys_role_menu` VALUES (28, 1, 23);
INSERT INTO `tz_sys_role_menu` VALUES (29, 1, 24);
INSERT INTO `tz_sys_role_menu` VALUES (30, 1, 25);
INSERT INTO `tz_sys_role_menu` VALUES (31, 1, 54);
INSERT INTO `tz_sys_role_menu` VALUES (32, 1, 18);
INSERT INTO `tz_sys_role_menu` VALUES (33, 1, 41);
INSERT INTO `tz_sys_role_menu` VALUES (34, 1, 42);
INSERT INTO `tz_sys_role_menu` VALUES (35, 1, 43);
INSERT INTO `tz_sys_role_menu` VALUES (36, 1, 55);
INSERT INTO `tz_sys_role_menu` VALUES (37, 1, 46);
INSERT INTO `tz_sys_role_menu` VALUES (38, 1, 47);
INSERT INTO `tz_sys_role_menu` VALUES (39, 1, 48);
INSERT INTO `tz_sys_role_menu` VALUES (40, 1, 49);
INSERT INTO `tz_sys_role_menu` VALUES (41, 1, 59);
INSERT INTO `tz_sys_role_menu` VALUES (42, 1, 56);
INSERT INTO `tz_sys_role_menu` VALUES (43, 1, 57);
INSERT INTO `tz_sys_role_menu` VALUES (44, 1, 58);
INSERT INTO `tz_sys_role_menu` VALUES (45, 1, 19);
INSERT INTO `tz_sys_role_menu` VALUES (46, 1, 20);
INSERT INTO `tz_sys_role_menu` VALUES (47, 1, 60);
INSERT INTO `tz_sys_role_menu` VALUES (48, 1, 29);
INSERT INTO `tz_sys_role_menu` VALUES (49, 1, 30);
INSERT INTO `tz_sys_role_menu` VALUES (50, 1, 31);
INSERT INTO `tz_sys_role_menu` VALUES (51, 1, 21);
INSERT INTO `tz_sys_role_menu` VALUES (52, 1, 61);
INSERT INTO `tz_sys_role_menu` VALUES (53, 1, 32);
INSERT INTO `tz_sys_role_menu` VALUES (54, 1, 33);
INSERT INTO `tz_sys_role_menu` VALUES (55, 1, 34);
INSERT INTO `tz_sys_role_menu` VALUES (56, 1, 22);
INSERT INTO `tz_sys_role_menu` VALUES (57, 1, 62);
INSERT INTO `tz_sys_role_menu` VALUES (58, 1, 35);
INSERT INTO `tz_sys_role_menu` VALUES (59, 1, 36);
INSERT INTO `tz_sys_role_menu` VALUES (60, 1, 37);
INSERT INTO `tz_sys_role_menu` VALUES (61, 1, 44);
INSERT INTO `tz_sys_role_menu` VALUES (62, 1, 45);
COMMIT;

-- ----------------------------
-- Table structure for tz_sys_user
-- ----------------------------
DROP TABLE IF EXISTS `tz_sys_user`;
CREATE TABLE `tz_sys_user` (
  `user_id` varchar(256) DEFAULT NULL COMMENT '用户id',
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键内部id',
  `username` varchar(50) NOT NULL COMMENT '''用户名''',
  `password` varchar(100) NOT NULL COMMENT '''密码''',
  `password_salt` varchar(255) NOT NULL COMMENT '''密码salt值''',
  `email` varchar(100) DEFAULT NULL COMMENT '''邮箱''',
  `mobile` varchar(100) DEFAULT NULL COMMENT '''手机号''',
  `status` tinyint DEFAULT '2' COMMENT '''状态  1:停用   2:启用''',
  `create_user_id` bigint DEFAULT NULL COMMENT '''创建者ID''',
  `created_at` datetime DEFAULT NULL,
  `shop_id` bigint DEFAULT NULL COMMENT '''用户所在的商城Id''',
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of tz_sys_user
-- ----------------------------
BEGIN;
INSERT INTO `tz_sys_user` VALUES ('2fb2f309-644e-4aa2-811d-f8a394329487', 1, 'superadmin', 'f8312246ddf2ad1015c9e4a62de0e7cfa8a32db1', '9d8486cb955ef04390a9911a01f8a5f980459bfe18d9448d51883845340048450f1ef1974846b9d8f9a88849', '422720735@qq.com', '15308179233', 2, 0, '2021-12-31 19:54:09', 1, NULL);
COMMIT;

-- ----------------------------
-- Table structure for tz_sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `tz_sys_user_role`;
CREATE TABLE `tz_sys_user_role` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` bigint DEFAULT NULL COMMENT '管理员ID',
  `role_id` bigint DEFAULT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of tz_sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `tz_sys_user_role` VALUES (2, 1, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
